SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE FUNCTION [dbo].[ObtenerModoUsuario] ()
RETURNS  INT
AS  
BEGIN 
  DECLARE @ModoUsuario INT 
  SELECT @ModoUsuario=Modo FROM TB_Usuarios WHERE NTUser=SYSTEM_USER
  RETURN (@ModoUsuario)
END
GO
GRANT EXECUTE ON  [dbo].[ObtenerModoUsuario] TO [public]
GRANT EXECUTE ON  [dbo].[ObtenerModoUsuario] TO [SoloVer]
GO
